<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        $this->view->title = 'Welcome';

        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            $firstName = $auth->getIdentity()->first_name;

            $this->view->title .= ', '. $firstName;
            $this->view->firstName = $firstName;
        }
    }

    public function menuAction()
    {
        $mainMenu = array(
            array('title'=>'Home', 'controller' => 'index', 'action' => 'index'),
            array('title'=>'Subfolder Search', 'controller' => 'subfolder', 'action' => 'index'),
            array('title'=>'Subfolder List', 'controller' => 'subfolder', 'action' => 'list'),
            array('title'=>'Master Path', 'controller' => 'master-path', 'action' => 'index'),
            array('title'=>'Users', 'controller' => 'user', 'action' => 'index'),
        );

        $this->view->menu = $mainMenu;
        $this->_helper->viewRenderer->setResponseSegment('menu');
    }
}



